import Vue from "vue";
import App from "@/App.vue";
import createRoute from "@/router";
import appStore from "@/store";
import "@/common.js";
import routes from "./router";
import $focus from "epg-focus-vue";
Vue.use($focus, { includeAttr: "setIncludeStr" });
let router = createRoute(routes);
let store = appStore({
  state: { includeStr: "index,list" },
  mutations: {
    setIncludeStr: state => {
      state.includeStr = "index,list";
    },
    addExclude: (state, str) => {
      let include = "index,list";
      let arr = include.split(",");
      state.includeStr = arr.filter(val => val !== str).join(",");
    }
  }
});
/**
 * 设置为false，阻止VUE在启动时生成生产提示
 */
Vue.config.productionTip = false;
new Vue({
  router,
  store,
  render: h => h(App),
  mounted() {
    window.app = this;
  }
}).$mount("#app");
